qui(function(require, exports, module) {

    PreSet.Config = {

		REPEAT_INFO : ["周一","周二","周三","周四","周五","周六","周日"], //播放日期
		PRIORITY : ["低","中","高","紧急"],    //优先级
		PRIORITY_VALUE : ["0", "1", "2", "3"],
		SCALE : ["保持原有比例","16：9","4：3"],       //宽高比
		SCALE_VALUE : ["", "16x9", "4x3"],


        validator: {
                messages: {
                    "thriftVideo.albumId": {
                        "required": "专辑不能为空"
                    },
                    "repeat_info": {
                        "required": '播放日期不能为空'
                    },
                    "scale": {
                        "required": '宽高比不能为空'
                    },
                    "start_time": {
                        "required": '节目开始时间不能为空',
						isValidTime: "格式为：12:30:20"
                    },
                    "stop_time": {
                        "required": '节目结束时间不能为空',
						isValidTime: "格式为：13:30:20"
                    },
                    "priority": {
                        "required": '转码优先级'
                    }
                },
                rules: {
                    "thriftVideo.albumId": {
						"required": true
                    },
                    "repeat_info": {
						"required": true
                    },
                    "scale": {
						"required": true
                    },
                    "start_time": {
						"required": true,
						isValidTime: true
                    },
                    "stop_time": {
						"required": true,
						isValidTime: true
                    },
                    "priority": {
						"required": true
                    }
                }
            },


			TABLE_COLMODEL_CONFIG: {
				'ablum_name': {
					name: 'ablum_name',
					title: false,
					index: 'ablum_name',
					sortable: false,
					width: 140
				},
				'repeat_info': {
					name: 'repeat_info',
					title: false,
					index: 'repeat_info',
					align:'center',
					width: 230,
					sortable: false,
					formatter: function(v, o, r) {
						return PreSet.Util.formatter.repeatInfo(v,r);
					}
				},
				'start_time': {
					name: 'start_time',
					title: false,
					index: 'start_time',
					sortable: false,
					width: 100,
					align: 'center'
				},
				'stop_time': {
					name: 'stop_time',
					title: false,
					index: 'stop_time',
					width: 100,
					sortable: false,
					align: 'center'
				},
				'scale': {
					name: 'scale',
					title: false,
					index: 'scale',
					align:'center',
					sortable: false,
					width: 100,
					formatter: function(v, o, r) {
						return PreSet.Util.formatter.scale(v,r);
					}
				},
				'priority': {
					name: 'priority',
					index: 'priority',
					sortable: false,
					align:'center',
					width: 90,
					formatter: function(v, o, r) {
						return PreSet.Util.formatter.priority(v,r);
					}

				},
				'video_head': {
					name: 'video_head',
					index: 'video_head',
					sortable: false,
					width: 130,
					align: 'center',
					formatter: function(v, o, r) {
						return PreSet.Util.formatter.videoHead(v,r);
					}
				},
				'video_tail': {
					name: 'video_tail',
					index: 'video_tail',
					sortable: false,
					width: 130,
					align: 'center',
					formatter: function(v, o, r) {
						return PreSet.Util.formatter.videoTail(v,r);
					}
				},
				'ad_libary': {
					name: 'ad_libary',
					index: 'ad_libary',
					sortable: false,
					width: 130,
					align: 'center',
					formatter: function(v, o, r) {
						return PreSet.Util.formatter.adLibary(v,r);
					}
				},
				'score': {
					name: 'score',
					index: 'score',
					sortable: false,
					align:'center',
					width: 130,
					formatter: function(v, o, r) {
						return PreSet.Util.formatter.score(v,r);
					}
				},
				'avg_score': {
					name: 'avg_score',
					title: false,
					index: 'avg_score',
					sortable: false,
					align:'center',
					width: 130,
					formatter: function(v, o, r) {
						return PreSet.Util.formatter.avgScore(v,r);
					}


				},
				'operate': {
					name: 'operate',
					title: false,
					index: 'operate',
					width: 140,
					align:'center',
					sortable: false,

					formatter: function(v, o, r) {
						return PreSet.Util.formatter.operate(v,r);
					}
				}
			},

			TABLE: {
			    url: "/api/redirect",
			    datatype: "local",
			    loadtext: '加载中...',
                loadui: "block",
                mtype: "post",
				colNames: ["专辑名称", "播放时间", "开始时间", "结束时间", "宽高比", "优先级", "片头库", "片尾库",
				"广告库","最新节目准确率","平均准确率（最近30天）","操作"
				],
				colModel: ['ablum_name', 'repeat_info', 'start_time', 'stop_time', 'scale', 'priority',
				'video_head', 'video_tail','ad_libary', 'score', 'avg_score','operate'
				]
			}
		};
});